package com.future.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.future.domain.Article;
import com.future.domain.DTO.ArticleDTO;
import com.future.domain.Result;

import java.util.List;

public interface ArticleService extends IService<Article> {

    Result auditArticle(Long articleId, Integer isApproved);
    Result publishArticle( ArticleDTO articleDTO);
    Result getApprovedArticles(IPage<Article> page);

    Result getAuditArticles(IPage<Article> page);

    Result getArticlesByCategoryName(IPage<Article> page, String categoryName);

    Result getArticlesByAuthorAndTitle(IPage<Article> page, String title);

    Result getArticlesByTitle(IPage<Article> page, String title);

    Result getArticlesByCategoryId(IPage<Article> page, Long categoryId);

    Result getArticleLikeCount(Long articleId);

    Result getArticleByAuthorId(Long authorId, Integer pageNum, Integer pageSize);

    Result getSelfArticle(Integer pageNum, Integer pageSize);

    Result deleteSelfArticle(Long articleId);

    Result deleteArticle(Long articleId);

    Result getArticleByArticleId(Long articleId);
    Result getArticlesByAuthorIdAndTitle(IPage<Article> page, Long authorId, String title);


    Result checkArticle(Long articleId);
}